package academic.emailClient.security.persistence;

import java.util.ArrayList;

import academic.emailClient.security.model.User;

/**
 *  helps to create methods required to support persistence of user object 
 */
public interface UserDAO {
	
	/**
	 * Given an user with its username and password filled, returns the user with all informaiton
	 * @param user User with required information
	 * @return User if exists, if doesn't return null
	 */
	User load(User user);
	/**
	 * Loads all users created
	 * @return List of users
	 */
	ArrayList<User> load();
	/**
	 * Get user given the email account
	 * @param emailAccount User email account
	 * @return User if exists, if doesn't exists return null
	 */
	User getUser(String emailAccount);
	/**
	 * Get user given the fullname
	 * @param fullName User fullName
	 * @return User if exists, if doesn't exists return null
	 */
	User getUserByFullName(String fullName);
}
